package com.study.opencv;

import org.opencv.core.Mat;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;

import java.io.File;

public class HelloOpenCV {
    public static void main(String[] args) {
        // 加载Opencv库
        System.load(new File("src/main/resources/opencv/opencv_java481.dll").getAbsolutePath());
        // 读取图片
        Mat image = Imgcodecs.imread("src/main/resources/images/lena.jpg");
        // 显示图片
        HighGui.imshow("HelloOpenCV", image);
        HighGui.waitKey(0);
        // 销毁窗口
        HighGui.destroyAllWindows();
        System.exit(0);
    }
}
